<template>
  <view class="all">
    <view class="entire">
      <view class="title">{{ topic.title }}</view>
      <image :src="topic.cover" class="picture" mode="aspectFill"></image>
      <view class="bottom">
        <view style="margin-left: 30rpx; margin-right: 20rpx">
          <wd-icon name="list" size="32rpx"></wd-icon>
        </view>
        课程: {{ topic.compCourseCount }}/{{ topic.courseCount }}
        <view style="margin-left: 50rpx; margin-right: 20rpx">
          <wd-icon name="edit" size="32rpx"></wd-icon>
        </view>
        考试: {{ topic.compExamCount }}/{{ topic.examCount }}
      </view>
    </view>
  </view>
</template>

<script setup>
const props = defineProps({
  topic: { type: Object, required: true },
})
</script>
<style scoped lang="scss">
.all {
  width: 750rpx;
  background-color: #e5effd;
  padding-top: 20rpx;
  padding-bottom: 20rpx;
  .entire {
    width: 700rpx;
    background-color: white;
    border-radius: 10rpx;
    overflow: hidden;
    margin-left: 25rpx;
    display: flex;
    flex-direction: column;
    .title {
      width: 700rpx;
      height: 50rpx;
      background-color: #254872;
      color: white;
      font-size: 25rpx;
      display: flex;
      align-items: center;
      padding-left: 20rpx;
    }
    .picture {
      width: 700rpx;
      height: 380rpx;
    }
    .bottom {
      color: grey;
      display: flex;
      width: 700rpx;
      height: 70rpx;
      font-size: small;
      align-items: center;
      background-color: white;
    }
  }
}
</style>
